import request from "@/utils/request";

const BASE_URL ='/admin/system/category/'
export default {
  getCategoryPageInfo(page,limit,searchObject){
    return request({
      url:`${BASE_URL}/${page}/${limit}`,
      method:'get',
      data:searchObject
    })
  },
  removeCategoryById(id){
    return request({
      url:`${BASE_URL}/delete/${id}`,
      method:'delete',
      data:id

    })

  },
  updateCategory(sysCategory){
    return request({
      url:`${BASE_URL}/update`,
      method:'post',
      data:sysCategory
    })

  },
  addCategory(sysCategory){
    return request({
      url:`${BASE_URL}/save`,
      method:'post',
      data:sysCategory

    })
  },
  findCategoryById(id){
    return request({
      url:`${BASE_URL}/find/${id}`,
      method:'get',
      param:id

    })
  },
  findAll(){
    return request({
      url:`${BASE_URL}/findAll`,
      method:'get',

    })
  }
}
